package com.xu.service.center;

import com.xu.pojo.Orders;
import com.xu.pojo.bo.SubmitOrderBO;
import com.xu.pojo.vo.MyOrdersVO;
import com.xu.pojo.vo.OrderStatusCountsVO;
import com.xu.pojo.vo.OrderVO;
import com.xu.utils.PagedGridResult;

import java.util.List;

/**
 * @author anan
 * @create 2022-01-17 17:15
 */
public interface MyOrderService {
    /**
     * 查询我的订单
     * @param userId
     * @param orderStatus
     * @param page
     * @param pageSize
     * @return
     */
    public PagedGridResult queryMyOrders(String userId,
                                         Integer orderStatus,
                                         Integer page,
                                         Integer pageSize);

    /**
     * @Description: 订单状态 --> 商家发货
     */
    public void updateDeliverOrderStatus(String orderId);

    /**
     * 查询用户id下有没有该订单，并且返回该订单
     * @param userId
     * @param orderId
     * @return
     */
    public Orders queryMyOrder(String userId, String orderId);


    /**
     * 更新订单至已经收货成功
     * @param orderId
     * @return
     */
    public boolean updateReceiveOrderStatus(String orderId);

    /**
     * 关闭
     * @param userId
     * @param orderId
     * @return
     */
    public boolean deleteOrder(String userId, String orderId);

    /**
     * 获取订单状态的数量
     * @param userId
     */
    public OrderStatusCountsVO getOrderStatusCounts(String userId);

    /**
     * 获取订单概况
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    public PagedGridResult getOrderTrend(String userId,
                                         Integer page,
                                         Integer pageSize);
}
